ga.view.streaming.nodes
Class PanelNode<T extends IIndividual<T>>

java.lang.Object
  extended by com.jme3.scene.Spatial
      extended by com.jme3.scene.Node
          extended by ga.view.streaming.nodes.PanelNode<T>
Type Parameters:
T - The generic type of the individuals.
All Implemented Interfaces:
com.jme3.asset.CloneableSmartAsset, com.jme3.collision.Collidable, com.jme3.export.Savable, java.lang.Cloneable

public class PanelNode<T extends IIndividual<T>>
extends com.jme3.scene.Node

This is a node that displays a show room as texture.

Since:
12.08.2012
Author:
Stephan Dreyer

Nested Class Summary
static class PanelNode.InfoStringType
          Type of node info to display.
static class PanelNode.Mode
          The state of the panel node.
 
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
com.jme3.scene.Spatial.BatchHint, com.jme3.scene.Spatial.CullHint
 
Field Summary
private  AnchorNode<T> anchor
           
private  com.jme3.bullet.control.RigidBodyControl control
           
private  float fadeSpeed
           
private  float fadeToAlpha
           
private  T individual
           
private  PanelNode.InfoStringType infoStringType
           
private static com.jme3.math.Vector3f INSPECT_LOCATION
           
private  boolean isInitFade
           
private  com.jme3.math.Vector3f lastLocation
           
private  PanelNodeListener<T> listener
           
private static java.util.logging.Logger LOGGER
           
private  com.jme3.material.Material mat
           
private  float materialAlpha
           
private  PanelNode.Mode mode
           
private  OffscreenProcessor processor
           
private  ShowRoom showRoom
           
private  com.jme3.math.Vector3f targetLocation
           
private  float x
           
private  float y
           
private  float z
           
 
Fields inherited from class com.jme3.scene.Node
children
 
Fields inherited from class com.jme3.scene.Spatial
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform
 
Constructor Summary
PanelNode(com.jme3.asset.AssetManager assetManager, com.jme3.system.AppSettings settings, ShowRoom showRoom, CameraSettings camSettings, T individual)
          Instantiates a new panel node.
 
Method Summary
 AnchorNode<T> getAnchor()
          Gets the anchor.
 com.jme3.bullet.control.RigidBodyControl getControl()
          Gets the control.
 T getIndividual()
          Gets the individual.
 OffscreenProcessor getProcessor()
          Gets the offscreen processor.
 ShowRoom getShowRoom()
          Gets the show room.
 void inspect()
          Triggers an inspect event.
 void inspectDone()
          Triggers an inspect done event.
 void setAnchor(AnchorNode<T> anchor)
          Sets the anchor.
 void setCameraSettings(CameraSettings camSettings)
          Sets the camera settings.
 void setFadeSpeed(float fadeSpeed)
          Sets the fade speed.
 void setFadeToAlpha(float alpha)
          Triggers fading to a given alpha value.
 void setInfoStringType(PanelNode.InfoStringType infoStringType)
          Sets the info string type.
 void setPanelNodeListener(PanelNodeListener<T> listener)
          Sets the panel node listener.
protected  void setParent(com.jme3.scene.Node parent)
           
private  void updateDebugText()
          Updates debug text.
 void updateLogicalState(float tpf)
           
 
Methods inherited from class com.jme3.scene.Node
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, read, setLightListRefresh, setLodLevel, setMaterial, setModelBound, setTransformRefresh, swapChildren, updateGeometricState, updateModelBound, updateWorldBound, write
 
Methods inherited from class com.jme3.scene.Spatial
addControl, addLight, breadthFirstTraversal, center, checkCulling, clone, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setShadowMode, setUserData, toString, updateWorldLightList, updateWorldTransforms, worldToLocal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER

private static final java.util.logging.Logger LOGGER

INSPECT_LOCATION

private static final com.jme3.math.Vector3f INSPECT_LOCATION

anchor

private AnchorNode<T extends IIndividual<T>> anchor

x

private final float x
See Also:
Constant Field Values

y

private final float y
See Also:
Constant Field Values

z

private final float z

mat

private final com.jme3.material.Material mat

materialAlpha

private float materialAlpha

fadeToAlpha

private float fadeToAlpha

processor

private final OffscreenProcessor processor

showRoom

private final ShowRoom showRoom

fadeSpeed

private float fadeSpeed

listener

private PanelNodeListener<T extends IIndividual<T>> listener

isInitFade

private boolean isInitFade

targetLocation

private com.jme3.math.Vector3f targetLocation

lastLocation

private com.jme3.math.Vector3f lastLocation

mode

private PanelNode.Mode mode

individual

private final T extends IIndividual<T> individual

control

private final com.jme3.bullet.control.RigidBodyControl control

infoStringType

private PanelNode.InfoStringType infoStringType
Constructor Detail

PanelNode

public PanelNode(com.jme3.asset.AssetManager assetManager,
                 com.jme3.system.AppSettings settings,
                 ShowRoom showRoom,
                 CameraSettings camSettings,
                 T individual)
Instantiates a new panel node.

Parameters:
assetManager - the asset manager
settings - the settings
showRoom - the show room
camSettings - the cam settings
individual - the individual
Since:
12.08.2012
Method Detail

setInfoStringType

public void setInfoStringType(PanelNode.InfoStringType infoStringType)
Sets the info string type.

Parameters:
infoStringType - the new info string type
Since:
12.08.2012

updateDebugText

private void updateDebugText()
Updates debug text.

Since:
12.08.2012

setCameraSettings

public void setCameraSettings(CameraSettings camSettings)
Sets the camera settings.

Parameters:
camSettings - the new camera settings
Since:
12.08.2012

getControl

public com.jme3.bullet.control.RigidBodyControl getControl()
Gets the control.

Returns:
the control
Since:
12.08.2012

getShowRoom

public ShowRoom getShowRoom()
Gets the show room.

Returns:
the show room
Since:
12.08.2012

updateLogicalState

public void updateLogicalState(float tpf)
Overrides:
updateLogicalState in class com.jme3.scene.Node

inspect

public void inspect()
Triggers an inspect event. The node will move to the camera.

Since:
12.08.2012

inspectDone

public void inspectDone()
Triggers an inspect done event. The node will move back to the old position.

Since:
12.08.2012

setParent

protected void setParent(com.jme3.scene.Node parent)
Overrides:
setParent in class com.jme3.scene.Spatial

getIndividual

public T getIndividual()
Gets the individual.

Returns:
the individual
Since:
12.08.2012

setPanelNodeListener

public void setPanelNodeListener(PanelNodeListener<T> listener)
Sets the panel node listener.

Parameters:
listener - the new panel node listener
Since:
12.08.2012

setAnchor

public void setAnchor(AnchorNode<T> anchor)
Sets the anchor.

Parameters:
anchor - the new anchor
Since:
12.08.2012

getAnchor

public AnchorNode<T> getAnchor()
Gets the anchor.

Returns:
the anchor
Since:
12.08.2012

getProcessor

public OffscreenProcessor getProcessor()
Gets the offscreen processor.

Returns:
the processor
Since:
12.08.2012

setFadeToAlpha

public void setFadeToAlpha(float alpha)
Triggers fading to a given alpha value.

Parameters:
alpha - the new alpha
Since:
12.08.2012

setFadeSpeed

public void setFadeSpeed(float fadeSpeed)
Sets the fade speed.

Parameters:
fadeSpeed - the new fade speed
Since:
12.08.2012